<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/6/13
  Time: 9:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>文件上传与下载</title>
    <style>
        .box{
            height: 30px;
        }
    </style>
</head>
<body>
  <h2> 文件上传 </h2>

 <form action="${pageContext.request.contextPath}/fileUploadServlet" method="post" enctype="multipart/form-data">

     <div class="box" >
        文件说明： <input type="text" value="" placeholder="请输入文件说明" name="finfo">
     </div>
     <br>

     <div class="box" >
         <input type="file" name="fname" >
     </div>
     <br>
     <input type="submit" value="提交">
 </form>


  <hr>
  <h2>文件下载</h2>
  <a href="${pageContext.request.contextPath}/downloadsServlet?name=test.txt">下载文档txt </a> <br>
  <a href="${pageContext.request.contextPath}/downloadsServlet?name=Choice.mp4">下载视频</a> <br>
  <a href="${pageContext.request.contextPath}/downloadsServlet?name=1001.PNG">下载图片 </a>
</body>

</html>
